import Vue from 'vue'
import VueRouter from 'vue-router'
import GoodList from './../views/GoodsList.vue'
import Cart from './../views/Cart.vue'
import Address from './../views/Address.vue'
import OrderConfirm from './../views/OrderConfirm.vue'
import OrderSuccess from './../views/OrderSuccess.vue'
Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/goodList'
  },
  {
    path: '/goodList',
    component: GoodList
  }, {
    path: '/cart',
    component: Cart
  }, {
    path: '/address',
    component: Address
  }, {
    path: '/orderConfirm',
    component: OrderConfirm
  }, {
    path: '/orderSuccess',
    component: OrderSuccess
  }
]

const router = new VueRouter({
  routes
})

export default router
